Adding countries
Moderators: Slitherine Core, Panzer Corps Design, Panzer Corps Moderators
-
BiteNibbleChomp
- Lieutenant-General - Do 217E
- Posts: 3229
- Joined: Mon Jul 01, 2013 6:35 am
Adding countries
How do you add a country in Panzer Corps?
I am attempting to add Czechoslovakia for the purpose of a 1938 campaign.
Also, how do get the "Genric Mod Enabler" thing and what does it do?
- BNC
I am attempting to add Czechoslovakia for the purpose of a 1938 campaign.
Also, how do get the "Genric Mod Enabler" thing and what does it do?
- BNC
Creator of American Civil War mod for Strategic Command WWI!
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
-
Cataphract88
- Master Sergeant - U-boat
- Posts: 521
- Joined: Wed Apr 22, 2009 8:56 pm
- Location: London
Re: Adding countries
Hi BNC,
I wouldn't know where to start with the country thing, but I can tell you that in the 'Stickies' section of the Panzer Corps forum their is an entry called 'How to install Generic Mod Enabler'. This includes a link for downloading the GME, and detailed information.
Hope this helps.
I wouldn't know where to start with the country thing, but I can tell you that in the 'Stickies' section of the Panzer Corps forum their is an entry called 'How to install Generic Mod Enabler'. This includes a link for downloading the GME, and detailed information.
Hope this helps.
Richard
Re: Adding countries
Do you need it additionally to the existing countries at all costs? Otherwise it would be much easier to modify an existing country to Cze.BiteNibbleChomp wrote:How do you add a country in Panzer Corps?
I am attempting to add Czechoslovakia for the purpose of a 1938 campaign.
For this, pick a country from the game you don't need, then edit its name to "Czechoslovakia" in the strings.pzdat file in Data/
Then you need to change the various gfx showing the flag to have a Czech flag:
- one in the "flags" file under Graphics/Overlays/
- one in UI/Flags
- one in UI/Purchase/Flags
Then give your Czech units the number code of the country you changed for this in the equipment.pzdat
IIRC that would be all in this way (tho it has been a while so maybe I forgot something). Backups for everything you change are highly recommended of course.
There's a second way to really add a completely new country without modifying an older one, but it's way more work and more error-prone, and could need rework with new patches. However, if the above isn't enough for you I can see to post more on this.
-
BiteNibbleChomp
- Lieutenant-General - Do 217E
- Posts: 3229
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding countries
I was interested in adding them without removing any other countries, and giving them a new country code etc.
Creator of American Civil War mod for Strategic Command WWI!
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Re: Adding countries
I was afraid you'd say that 
So here we go - as per usual, make backups of game files you change. Rezaf explained me this once, and I use it in my mods without trouble, but it requires that you use GME, unless you want to mod all files in the game folder(s), which is hardly on option if you want to distribute the mod. For use with GME put all files you changed into your mod's folder, and use subfolders replicating the main game's folder structure if needed. So all files orginally in data/ go into Your_mod_folder/data/ and so on.
1. Data files
IIRC right now there are 32 countries (starting by 0). Assuming there is no hardcoded limit here (dunno) you should be able to add more.
The last entry in the data/strings.pzdat is for Vichy France using no. 31 (since it starts with 0). Look how those entries are formatted (tabs), and edit in there:
Then open data/nations.pzdat an add Czechoslovakia at the end as well plus a number determining the whether you want Cze to be axis or allies by default (unless changed in the editor). Should be self-explaining when you look at the other entries.
When you edit units nto the equipment.pzdat, use 32 as country code for Czech units of course.
2. GFX files (flags)
As explained above, you need all the gfx for those flags in the correct folders. When you open the "flags" file under Graphics/Overlays/ you'll see all country flags in some kind of roster - add one for Cze after the Vichy flag in the same fashion.
The gfx in UI/Flags and in UI/Purchase/Flags are showing only one flag each, using the country code as file name. So you need those files showing a Cze flag, named both "32" in the correct folders.
3. Editor files
You need to edit several editor filesin the UI folder to make sure you can use your new country in the game's editor, otherwise you cannot add VHs, airfields or units for it.
The files in question are:
editor_condmap
editor_scnparams
editor_unitfilter
editor_unitparams
These are HTML files, so you can edit them using a text editor, just make sure you don't mess up any tags. Basically search for the entries there that refer to countries, than add a similar one for Cze. Example:
editor_condmap.html seems to be used in the editor to set trigger and victory conditions. If you scroll down a bit you'll see a list of all countries under
You need to add another line below Vichy there:
editor_scnparams has entries for changing the side a country belongs to per scenario, here for Ger:
Add a similar one for Cze.
editor_unitfilter.html has a country list which refers to labels from the strings file, for Cze add:
editor_unitparams.html has a country list like editor_condmap, add a similar entry here.
Finally, if we ever get a patch or XP with even more countries you probably need to rework this accordingly.
I hope that helps and I didn't forget something, wrote it kinda fast. Feel free to ask if there's a prob
So here we go - as per usual, make backups of game files you change. Rezaf explained me this once, and I use it in my mods without trouble, but it requires that you use GME, unless you want to mod all files in the game folder(s), which is hardly on option if you want to distribute the mod. For use with GME put all files you changed into your mod's folder, and use subfolders replicating the main game's folder structure if needed. So all files orginally in data/ go into Your_mod_folder/data/ and so on.
1. Data files
IIRC right now there are 32 countries (starting by 0). Assuming there is no hardcoded limit here (dunno) you should be able to add more.
The last entry in the data/strings.pzdat is for Vichy France using no. 31 (since it starts with 0). Look how those entries are formatted (tabs), and edit in there:
Code: Select all
IDS_NATION32 CzechoslovakiaWhen you edit units nto the equipment.pzdat, use 32 as country code for Czech units of course.
2. GFX files (flags)
As explained above, you need all the gfx for those flags in the correct folders. When you open the "flags" file under Graphics/Overlays/ you'll see all country flags in some kind of roster - add one for Cze after the Vichy flag in the same fashion.
The gfx in UI/Flags and in UI/Purchase/Flags are showing only one flag each, using the country code as file name. So you need those files showing a Cze flag, named both "32" in the correct folders.
3. Editor files
You need to edit several editor filesin the UI folder to make sure you can use your new country in the game's editor, otherwise you cannot add VHs, airfields or units for it.
The files in question are:
editor_condmap
editor_scnparams
editor_unitfilter
editor_unitparams
These are HTML files, so you can edit them using a text editor, just make sure you don't mess up any tags. Basically search for the entries there that refer to countries, than add a similar one for Cze. Example:
editor_condmap.html seems to be used in the editor to set trigger and victory conditions. If you scroll down a bit you'll see a list of all countries under
Code: Select all
<select id="UnitFlag">Code: Select all
<option value="32">Czechoslovakia</option>Code: Select all
<input name="Germany" type="radio" id="GermanyUnused" style="margin:auto" style="margin:auto" />
<input name="Germany" type="radio" id="GermanyAxis" style="margin:auto" style="margin:auto" />
<input name="Germany" type="radio" id="GermanyAllied" style="margin:auto" style="margin:auto" />editor_unitfilter.html has a country list which refers to labels from the strings file, for Cze add:
Code: Select all
<option value="32">IDS_NATION32</option>Finally, if we ever get a patch or XP with even more countries you probably need to rework this accordingly.
I hope that helps and I didn't forget something, wrote it kinda fast. Feel free to ask if there's a prob
-
BiteNibbleChomp
- Lieutenant-General - Do 217E
- Posts: 3229
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding countries
I've managed to get as far as adding the flag in ...\Overlays.
In the UI\Flags folder, 32 was already taken by something that looks like Canada or India?
Would this be likely to affect anything -> should Cze be labeled as 33?
(Germany began at 1, not 0 which may be the neutral flag?)
Any ideas for this
- I attached a screenshot of the folder if this is any help - but 1-6 couldnt be shown beause of my screens low resolution (1024*768)
-BNC
In the UI\Flags folder, 32 was already taken by something that looks like Canada or India?
Would this be likely to affect anything -> should Cze be labeled as 33?
(Germany began at 1, not 0 which may be the neutral flag?)
Any ideas for this
-BNC
- Attachments
-
- flag folder.JPG (94.11 KiB) Viewed 5350 times
Creator of American Civil War mod for Strategic Command WWI!
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Re: Adding countries
That is Vichy France.BiteNibbleChomp wrote:I've managed to get as far as adding the flag in ...\Overlays.
In the UI\Flags folder, 32 was already taken by something that looks like Canada or India?
Would this be likely to affect anything -> should Cze be labeled as 33?
(Germany began at 1, not 0 which may be the neutral flag?)
Any ideas for this- I attached a screenshot of the folder if this is any help - but 1-6 couldnt be shown beause of my screens low resolution (1024*768)
-BNC
For ID in text file from 0-31
For FILES from 1-32
Re: Adding countries
Yeah, T2 is right. That was a mistake on my part 
If you add Cze as IDS_NATION32 it will use 32 in the equipment file, but the little flag files in the UI folders need to be named 33 then. I guess it's because of the neutral (white) flag they have as the first.
If you add Cze as IDS_NATION32 it will use 32 in the equipment file, but the little flag files in the UI folders need to be named 33 then. I guess it's because of the neutral (white) flag they have as the first.
Re: Adding countries
No, u dont have any mistake but game dev have. They make us confuse with the IDbebro wrote:Yeah, T2 is right. That was a mistake on my part
If you add Cze as IDS_NATION32 it will use 32 in the equipment file, but the little flag files in the UI folders need to be named 33 then. I guess it's because of the neutral (white) flag they have as the first.
-
BiteNibbleChomp
- Lieutenant-General - Do 217E
- Posts: 3229
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding countries
Ok, all of the stuff you put up earlier has been done (inlcuding files called 33) and now when the mod is enabled. When I try to launch the editor it comes up with the message: "Failed to load global game parameters"
What am I supposed to do here -
Cze has no units made for it yet - would this be affecting it.
-BNC
What am I supposed to do here -
Cze has no units made for it yet - would this be affecting it.
-BNC
Creator of American Civil War mod for Strategic Command WWI!
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Re: Adding countries
Never had this prob, but I guess this points to an error in the file editor_scnparams.html
I take it you checked everything for typos or messed up html tags?
The relevant part in the original file looks like this for me:
Before the closing </table> you need to add:
I take it you checked everything for typos or messed up html tags?
The relevant part in the original file looks like this for me:
<tr>
<td style="text-align:right">IDS_NATION31:</td>
<td colspan=3>
<input name="Vichy France" type="radio" id="VichyFranceUnused" style="margin:auto" />
<input name="Vichy France" type="radio" id="VichyFranceAxis" style="margin:auto" />
<input name="Vichy France" type="radio" id="VichyFranceAllied" style="margin:auto" />
</td>
</tr>
</table>
Before the closing </table> you need to add:
That's all IIRC, as said, has been a while since I did this. I also never added countries beyond # 30, since earlier PzC did not have as much. So if there's a hidden limit of 32 or something I dunno, only the devs could tell.<tr>
<td style="text-align:right">IDS_NATION32:</td>
<td colspan=3>
<input name="Yourcountry_name" type="radio" id="Yourcountry_nameUnused" style="margin:auto" />
<input name="Yourcountry_name" type="radio" id="Yourcountry_nameAxis" style="margin:auto" />
<input name="Yourcountry_name" type="radio" id="Yourcountry_nameAllied" style="margin:auto" />
</td>
</tr>
-
BiteNibbleChomp
- Lieutenant-General - Do 217E
- Posts: 3229
- Joined: Mon Jul 01, 2013 6:35 am
Re: Adding countries
Bother, I was hoping 32 wasn't the limit.
Anyway, I managed to think up a new campaign called Small Europe - which takes the mainstream Wehrmacht campaign, and halves the number of units, turns etc. so you play a scenario very quickly (the first can be beaten in 10mins) - ideal for people who haven't long to play games.
Bebro, would you be interested in beta-testing this in a couple of weeks?
We will discuss this more on my new thread called "small europe campaign 39-45"
- BNC
Anyway, I managed to think up a new campaign called Small Europe - which takes the mainstream Wehrmacht campaign, and halves the number of units, turns etc. so you play a scenario very quickly (the first can be beaten in 10mins) - ideal for people who haven't long to play games.
Bebro, would you be interested in beta-testing this in a couple of weeks?
We will discuss this more on my new thread called "small europe campaign 39-45"
- BNC
Creator of American Civil War mod for Strategic Command WWI!
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Discuss here: http://www.matrixgames.com/forums/tm.asp?m=4504986
Download: http://www.mediafire.com/file/tj4t11z3ttl142w/SCACW.zip/file
Re: Adding countries
I just had this happen to me. I use Excel for editing (and I like doing so) and it had managed to put quotes round large sections of entries in strings.pzdat.BiteNibbleChomp wrote:Ok, all of the stuff you put up earlier has been done (inlcuding files called 33) and now when the mod is enabled. When I try to launch the editor it comes up with the message: "Failed to load global game parameters"
Is it possible to stop it doing this?
I've got quite casual about using this tool to edit files in the Data folder. Luckily I'd kept a backup of my install folder but I'd prefer not to be double-checking every edit in Notepad++.
-
terminator
- General - Elite King Tiger
- Posts: 4401
- Joined: Mon Aug 15, 2011 12:48 pm
- Location: the loveliest country in the world
Re: Adding countries
Here you can see an example with WaffenSS and Kriegsmarine as new nations :
http://www.slitherine.com/forum/viewtop ... 47&t=74939
http://www.slitherine.com/forum/viewtop ... 47&t=74939
Re: Adding countries
I've not had a problem getting the additional nations to work (I've added about nine new ones so far)... it's just that with the last one Excel screwed up my strings.pzdat file.
-
Yrfin
- 2nd Lieutenant - Panzer IVF/2
- Posts: 655
- Joined: Sun Dec 04, 2016 6:47 am
- Location: Behind your backs
Re: Adding countries
With Excel problem Im using next algorithm:
Make copy *.pzdat file before !
1.Open *.pzdat in Excel
2.Select All, Clear All
3.Change format all cells to Text
4.Open *.pzdat in Notes
5.Select All, Copy.
6.Switch to Excel, Paste.
7.Edit
8.Save as Unicode format
9.When Close Excel don't save *.pzdat again !
10. Next time just open *.pzdat in Excel and Edit/Save
Make copy *.pzdat file before !
1.Open *.pzdat in Excel
2.Select All, Clear All
3.Change format all cells to Text
4.Open *.pzdat in Notes
5.Select All, Copy.
6.Switch to Excel, Paste.
7.Edit
8.Save as Unicode format
9.When Close Excel don't save *.pzdat again !
10. Next time just open *.pzdat in Excel and Edit/Save
Why ?! Why what !? Why not...
Re: Adding countries
I'm wondering whether I accidentally did save it again as I haven't had the problem before or since.Yrfin wrote:With Excel problem Im using next algorithm:
Make copy *.pzdat file before !
.......
9.When Close Excel don't save *.pzdat again !






